import request from '@/router/axios';

export const getList = (page, size, params) => {
  return request({
    url: '/base/sellerBrand/list',
    method: 'post',
    params: {
      ...params,
      page,
      size,
    }
  })
}
export const remove = (id) => {
  return request({
    url: '/base/sellerBrand/delete',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      id,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/base/sellerBrand/addItem',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: row
  })
}

export const addClassBrand = (brandId,goodsClassId) => {
  return request({
    url: '/base/classBrand/addItem',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      brandId,
      goodsClassId
    }

  })
}

export const update = (row) => {
  return request({
    url: '/base/sellerBrand/editItem',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: row
  })
}

export const getUser = (id) => {
  return request({
    url: '/api/mgr/getUserInfo',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      id,
    }
  })
}

export const changeStatus = (userId, status) => {
  return request({
    url: '/base/sellerBrand/changeStatus',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      userId,
      status
    }
  })
}